<template>
  <div>
    <button @click="openMessageBox">SHOW</button>
  </div>
</template>

<script>
export default {
  name: 'App',
  methods: {
    openMessageBox() {
      // console.log(this.$messageBox);
      //{show: ƒ, hide: ƒ}

      //执行子类实例里的公共方法show 并传入props对象
      this.$messageBox.show({
        title: 'App',
        content: 'This is Content for APP.',
        type: 'warn'
      });
    }
  }
};
</script>
